<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
<script type="text/javascript" src="${pageContext.request.contextPath}../statics/js/jquery-3.4.1.js"></script>

<%-- 问题，jquery导不进去 去设置这个 File | Settings | Languages & Frameworks | JavaScript | Libraries 看有没有jquery，没有就加进去--%>
  <script>
    function a(){
      jQuery.post({
        url:"${pageContext.request.contextPath}/a1",
        data:{"name":$("#username").val()},
      success:function (data,status) {
        console.log("data=>"+data);
        console.log("status=>"+status);
      },
        error:function () {
          
        }
           })
    }

  </script>

  </head>
  <body>
  <span> 用户名:</span>
   <input type="text" id="username" onblur="a()">


  </body>
</html>
